<#import "/global.ftl" as role_edit />
<form id="roleEditForm" method="post">
    <table>
        <tr>
            <td><label for="roleName">roleName:</label></td>
            <td><input class="easyui-validatebox" type="text" id="roleName" name="sysRole.roleName"
                   data-options="required:true" value="${sysRole.roleName}"/></td>
        </tr>
        <tr>
            <td><label for="roleOffice">roleOffice:</label></td>
            <td><input class="easyui-validatebox" type="text" id="roleOffice" name="sysRole.roleOffice"
                   data-options="required:true" value="${sysRole.roleOffice}"/></td>
        </tr>
        <tr>
            <td><label for="isSystem">isSystem:</label></td>
            <td><input class="easyui-validatebox" type="text" id="sort" name="sysRole.isSystem"
                   data-options="required:true" value="${sysRole.isSystem}" /></td>
        </tr>
        <tr>
            <td><label for="status">status:</label></td>
            <td>
                <input id="statusYes" type="radio" name="sysRole.status" checked value="1">启用</input>
                <input id="statusNo"  type="radio" name="sysRole.status" value="0" >禁用</input>
            </td>
        </tr>
        <tr>
            <td><label for="remarks">remarks:</label></td>
            <td>
                <input class="easyui-validatebox" type="text" id="remarks" name="sysRole.remarks" value="${sysRole.remarks}"/>
            </td>
        </tr>
    </table>
    <input type="hidden" name="pageType" value="${pageType}" />
    <input type="hidden" name="sysRole.roleId" value="${sysRole.roleId}" />
</form>
<script type="text/javascript">
    function roleEditSubmit(){
        $.post('<@role_edit.basePath/>/sys/role/save',
            $("#roleEditForm").serialize(),
            function(data){
                if(true==data.success){
                    $("#roleTables").datagrid('reload');
                    $('#addRoleDiv').dialog('close');
                } else {
                    $.messager.alert('error',data.message);
                }
            });
    }

</script>

